<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div>通过调试工具可以调整贝塞尔曲线</div>
    <div class="contariner">
      <div class="box"></div>
    </div>
  </body>
  <style>
    .contariner {
      height: 200px;
      width: 500px;
      display: flex;
      justify-content: center;
      align-items: center;
    }
    .box {
      height: 20px;
      width: 20px;
      border-radius: 10px;
      animation:
        x 2s,
        y 1s;
      animation-timing-function: cubic-bezier(0.31, -1.42, 0.79, 2.3);
      animation-iteration-count: infinite;
      animation-fill-mode: both;
      transform: translate(var(--x), var(--y));
      background-color: #f00;
    }
    @property --x {
      syntax: '<length>';
      initial-value: 0px;
      inherits: false;
    }
    @property --y {
      syntax: '<length>';
      initial-value: 0px;
      inherits: false;
    }
    @keyframes x {
      to {
        --x: 100px;
      }
    }
    @keyframes y {
      to {
        --y: 50px;
      }
    }
  </style>
</html>
